home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util4 / 0utils.lha / 0Utils / GetWord.doc < prev    next >
Text File  |  1995-09-05  |  1KB  |  77 lines

  1.  
  2.  
  3.  
  4.     NAME
  5.     GetWord
  6.  
  7.     SYNOPSIS
  8.     GetWord -  get one in a list of words  - Requires v37
  9.  
  10.     INPUTS
  11.     "NUMBER/N/A,WORDS/M"
  12.  
  13.     DESCRIPTION
  14.  
  15.     get a number and a couple of strings and
  16.     find the n-th string starting with 1.
  17.  
  18.     Negative numbers cause counting with the
  19.     last word.
  20.  
  21.     The resulting string is sent to STDOUT.
  22.  
  23.     Numbers, that exceed the number of words,
  24.     result in a returncode "10" (so does number=0)
  25.  
  26.      RESULT
  27.     word [number-1]
  28.     
  29.  
  30.     
  31.         
  32.  
  33.     NOTES
  34.     * CLI - only
  35.  
  36.     * should compile with SAS-C
  37.     
  38.  
  39.     BUGS
  40.  
  41.     there are problems, if GetWord is invoked with
  42.     wrong word number in Scripts: for unknown reason
  43.     the secondary result is cleared early.
  44.     (see .KnownBugs)
  45.  
  46.     The documentation wrongly stated a returncode 9
  47.     on wrong numbers.
  48.     
  49.  
  50.     EXAMPLES
  51.  
  52.     >GetWord  1 ali baba
  53.     "ali"
  54.  
  55.     >GetWord -1 ali baba
  56.     "baba"
  57.  
  58.     >GetWord 3 ali baba
  59.     "GetWord: bad number"
  60.     
  61.  
  62.     HISTORY
  63.  
  64.     01-08-93 b_noll created
  65.     23-08-93 b_noll completed
  66.     11-02-95 b_noll slight changes
  67.     20-02-95 b_noll restructured source
  68.     21-02-95 b_noll added version/format-prefix/offset
  69.     20-03-95 b_noll added args diagnostics
  70.     19-08-95 b_noll created .data file
  71.     
  72.  
  73.     AUTHOR
  74.     Bernd Noll, Brunnenstrasse 55, D-67661 Kaiserslautern
  75.     noll@student.uni-kl.de
  76.  
  77.